<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<% String appPath = request.getContextPath();%>
<html>
  <head>
	<title>内容管理</title>
	<base href="<%=request.getContextPath()%>">
	
	<script type="text/javascript">
  		window.UEDITOR_HOME_URL = "${ctx}/static/ueditor1_2_6/";
  		var appPath = "<%=appPath%>";
  	</script>
  	
	<link href="${ctx}/static/ueditor1_2_6/themes/default/css/ueditor.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" charset="utf-8" src="${ctx}/static/ueditor1_2_6/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="${ctx}/static/ueditor1_2_6/ueditor.all.js"></script>
	<script type="text/javascript" charset="utf-8" src="${ctx}/static/ueditor1_2_6/lang/zh-cn/zh-cn.js"></script>
  	
  	
  	<script type="text/javascript" src="${ctx}/static/common/common.js"></script>
  	<script type="text/javascript" src="${ctx}/static/easyui/easyloader.js"></script>
  	<script type="text/javascript" src="${ctx}/static/common/bootstrap.messageBox.js"></script>
  	
  	<script src="${ctx}/static/jquery-validation/1.11.0/jquery.validate.js" type="text/javascript"></script>
    <script src="${ctx}/static/jquery-validation/1.11.0/messages_zh.js" type="text/javascript"></script>
  
  	<script type="text/javascript" src="${ctx}/views/console/contentList.js"></script>
  	<script type="text/javascript" src="${ctx}/static/common/jquery.extend.js"></script>
  	
  	
  	<script type="text/javascript">
  	easyloader.locale = "zh_CN"; // easyui本地化设置
	easyloader.theme = "bootstrap"; // easyui设置主题
  	</script>
  	
  	
  	
  	<style type="text/css">
  		.datagrid-wrap{
  			padding: 1px;
  		}
  		.datagrid-pager{
  			width:100%;
  		}
  		#addContent {

		
		}
  	
  	</style>
  </head>
  <body>
  <br>
	<form class="form-inline" role="form">
  <div class="form-group">
    <label for="CONTENT_TITLE" class="col-sm-3 control-label">标题</label>
    <div class="col-sm-9">
      <input type="email" class="form-control" name="CONTENT_TITLE" id="CONTENT_TITLE" placeholder="标题">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-3 control-label">描述</label>
    <div class="col-sm-9">
      <input type="email" class="form-control" id="inputEmail3" placeholder="描述">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-5">
      <button type="button" class="btn btn-primary">查询</button>
    </div>
  </div>
</form>

<br>
<div class="alert alert-warning fade in hide" id="tipalert">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    <div id="tipalertcontent"></div>
</div>
<div class="gridPanel">
   <table id="userGrid">  
   </table> 
</div>
    <div class="row col-sm-12 col-lg-12">
    <!-- Modal -->
	<div class="modal fade" id="addContent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	  <div class="modal-dialog">
	    <div class="modal-content col-sm-12 col-lg-12">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	        <h4 class="modal-title" id="myModalLabel">添加内容</h4>
	      </div>
	      <div class="modal-body">
	      <div class="alert alert-warning fade in hide" id="modalalert">
		    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
		    <div id="modalalertcontent"></div>
		</div>
	        <form id="contentForm" class="form-horizontal" action="${ctx}/content/save" enctype="multipart/form-data" method="post" role="form">
	        <input type="hidden" id="CONTENT_ID" name="CONTENT_ID">
	        <input type="hidden" id="CONTENT_IMG" name="CONTENT_IMG">
			  <div class="form-group">
			    <label for="CONTENT_TITLE" class="col-sm-2 control-label">标题</label>
			    <div class="col-sm-10">
			      <input type="text" class="form-control" name="CONTENT_TITLE" id="CONTENT_TITLE" placeholder="标题" required>
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="file" class="col-sm-2 control-label">图片</label>
			    <div class="col-sm-5">
                <input type="file" name="file" id="fileupload">
			    </div>
			    <div class="col-sm-5">
			    <button type="button" id="upload" class="btn btn-primary btn-sm">
                    <i class="glyphicon glyphicon-upload"></i>
                    <span>上传</span>
            	</button>
            	<button type="button" id="remove" class="btn btn-warning btn-sm">
                    <i class="glyphicon glyphicon-remove"></i>
                    <span>删除</span>
            	</button>
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="CONTENT_DESC" class="col-sm-2 control-label">描述</label>
			    <div class="col-sm-10">
				    <textarea class="form-control" rows="2" id="CONTENT_DESC" name="CONTENT_DESC"></textarea>
			    </div>
			  </div>
			   <div class="form-group">
			    <label for="CONTENT" class="col-sm-2 control-label">内容</label>
			    <div class="col-sm-10">
			    	<textarea id="editor" style="margin-left: -13px;" class="col-sm-12" name="CONTENT" type="text/plain"></textarea>
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="CONTENT_URL" class="col-sm-2 control-label">路径</label>
			    <div class="col-sm-7">
			      <input type="text" class="form-control" name="CONTENT_URL" id="CONTENT_URL" placeholder="路径">
			    </div>
			    <div class="col-sm-3">
			      <button type="button" id="create" class="btn btn-info">生成静态HTML</button>
			    </div>
			  </div>
			</form>
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	        <button type="button" id="save" class="btn btn-primary" data-loading-text="正在保存...">保存</button>
	      </div>
	    </div><!-- /.modal-content -->
	  </div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	</div>
  
  
  </body>
</html> 
